import Vue from 'vue'
import VueRouter from 'vue-router'
import Health from '@/components/Health.vue'
import Holographic from '@/components/Holographic.vue'
import LayerdNow from '@/components/LayerdNow.vue'
import LayerdOld from '@/components/LayerdOld.vue'
import Map from '@/components/Map.vue'
import Alarm from '@/components/Alarm.vue'
import Screen from '@/views/Screen.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Health',
    component: Screen,
    children: [
      { path: '/alarm', component: Alarm },
      { path: '/health', component: Health },
      { path: '/layerd_old', component: LayerdOld },
      { path: '/layerd_now', component: LayerdNow },
      { path: '/map', component: Map },
      { path: '/holographic', component: Holographic },
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
